// RefPreferenceSet.cpp : implementation file
//

#include "stdafx.h"
#include "kwservercore.h"
#include "RefPreferenceSet.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CRefPreferenceSet

IMPLEMENT_DYNAMIC(CRefPreferenceSet, CRecordset)

	CRefPreferenceSet::CRefPreferenceSet(CDatabase* pdb)
	: CRecordset(pdb)
{
	//{{AFX_FIELD_INIT(CRefPreferenceSet)
	m_OptionId = 0;
	m_OptionName = _T("");
	m_DefaultValue = _T("");
	m_nFields = 3;
	//}}AFX_FIELD_INIT
	m_nDefaultType = snapshot;
}

CString CRefPreferenceSet::GetDefaultConnect()
{
	return _T("ODBC;DSN=KWSystem;UID=kwuser;PWD=1234");
}

CString CRefPreferenceSet::GetDefaultSQL()
{
	return _T("[dbo].[RefPreference]");
}

void CRefPreferenceSet::DoFieldExchange(CFieldExchange* pFX)
{
	//{{AFX_FIELD_MAP(CRefPreferenceSet)
	pFX->SetFieldType(CFieldExchange::outputColumn);
	RFX_Byte(pFX, _T("[OptionId]"), m_OptionId);
	RFX_Text(pFX, _T("[OptionName]"), m_OptionName);
	RFX_Text(pFX, _T("[DefaultValue]"), m_DefaultValue);
	//}}AFX_FIELD_MAP
}

/////////////////////////////////////////////////////////////////////////////
// CRefPreferenceSet diagnostics

#ifdef _DEBUG
void CRefPreferenceSet::AssertValid() const
{
	CRecordset::AssertValid();
}

void CRefPreferenceSet::Dump(CDumpContext& dc) const
{
	CRecordset::Dump(dc);
}
#endif //_DEBUG